package com.example.demo.conrtoller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.demo.entity.Box;
import com.example.demo.entity.Boxlist;
import com.example.demo.serive.FindPathSevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class AcceptList {

    @Autowired
    private FindPathSevice findPathSevice;

    @PostMapping(value="/getlist",produces  = "application/json;charset=UTF-8")
    @CrossOrigin
    public String getlist(@RequestBody Boxlist a){
        return  findPathSevice.FindPath(a.list,a.start,a.end);

    }
}
